package com.lucky.common.service;

import com.lucky.common.base.BaseService;
import com.lucky.common.mapper.OrgMapper;
import com.lucky.common.pojo.po.OrgPO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrgService extends BaseService<OrgMapper, OrgPO> {

	public Logger log = LoggerFactory.getLogger(OrgService.class);
	
	@Resource
	OrgMapper mapper2;

	
	public OrgPO getOrgByUserId(Long userId) {
		OrgPO orgPO = new OrgPO();
		
		orgPO = mapper2.getOrgByUserId(userId);
		
		return orgPO;
	}

	
	public List<OrgPO> query2() {
		
		List<OrgPO> voList =  jdbc.queryForList("select * from m_user_org", OrgPO.class);
		return voList;
	}

}
